#!bin/bash
func()
{
now_date=`date "+%Y-%m-%d"`
success_flag_timetamp=`hdfs dfs -stat "%Y" hdfs://yl-bg-hdp/dw/hive/jms_dim.db/external/dim_network_whole_massage/_SUCCESS`
if [ -z "$success_flag_timetamp" ]
then
      success_flag_timetamp=1
fi
success_flag=`expr $success_flag_timetamp / 1000`
flag_date=`date -d@$success_flag "+%Y-%m-%d"`
echo $now_date
echo $flag_date
}
while [ $now_date != $flag_date ]
do
  sleep 1m
  func
done
echo "sucess~~~"